﻿/*----------------------------------------------------------------
// Copyright (C) 2011 上海
// 版权所有。 
//
// 文件名：CardChangeVM
// 文件功能描述：人员换卡补卡models层
//
// 
// 创建标识：2012-02-17 王冲
//
// 修改标识：
// 修改描述：
//
//
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace WaiGaoQiaoWeb.Models
{
    public class CardChangeVM
    {
        /// <summary>
        /// 人员ID
        /// </summary>
        public int PID
        {
            get;
            set;
        }
        [Display(Name = "人员编号")]
        /// <summary>
        /// 人员编号
        /// </summary>
        public string EmpNo
        {
            get;
            set;
        }
        [Display(Name = "部门名称")]
        /// <summary>
        /// 部门名称
        /// </summary>
        public string deptName
        {
            get;
            set;
        }
        [Display(Name = "卡类型")]
        /// <summary>
        /// 卡类型(人员类型)
        /// </summary>
        public string PersonTypeName
        {
            get;
            set;
        }
        [Display(Name = "人员姓名")]
        /// <summary>
        /// 人员姓名
        /// </summary>
        public string PName
        {
            get;
            set;
        }
        /// <summary>
        /// 部门编号
        /// </summary>
        public int Dep_ID
        {
            get;
            set;
        }
        [Display(Name = "卡序列号")]
        /// <summary>
        /// 卡序列号
        /// </summary>
        public Int64 CardSerial
        {
            get;
            set;
        }
        [Display(Name = "押金")]
        /// <summary>
        /// 押金
        /// </summary>
        public decimal CardOptDeposit
        {
            get;
            set;
        }
        [Display(Name = "开户金额")]
        /// <summary>
        /// 开户金额
        /// </summary>
        public decimal Balance
        {
            get;
            set;
        }
        [Display(Name = "有效期始")]
        /// <summary>
        /// 有效期始
        /// </summary>
        public DateTime InureTime
        {
            get;
            set;
        }
        [Display(Name = "有效期止")]
        /// <summary>
        /// 有效期止
        /// </summary>
        public DateTime ExpiredTime
        {
            get;
            set;
        }
        [Display(Name = "操作员")]
        /// <summary>
        /// 操作员
        /// </summary>
        public string OperatorID
        {
            get;
            set;
        }
        [Display(Name = "卡状态")]
        /// <summary>
        /// 卡状态
        /// </summary>
        public string CardStatus
        {
            get;
            set;
        }
        [Display(Name = "工作状态")]
        /// <summary>
        /// 工作状态（即在职状态）
        /// </summary>
        public string WorkStatus
        {
            get;
            set;
        }
        [Display(Name = "新卡序列号")]
        [Remote("CheckNewCardSerial", "CardChange", AdditionalFields = "New_CardSerial,CardSerial", HttpMethod = "POST", ErrorMessage = "已存在此卡序列号")]
        //[RegularExpression("^([^0]|.{2,})$", ErrorMessage = "卡序列号不能只为0")]
        [StringLength(10, ErrorMessage = "新卡序列号最多允许输入10个字符")]
        [RegularExpression(@"^[1-9]\d*$", ErrorMessage = "卡序列号必须是大于0的整数")]
        /// <summary>
        /// 新卡序列号
        /// </summary>
        public string New_CardSerial
        {
            get;
            set;
        }
        [Range(0, 10000, ErrorMessage = "换卡费必须在10000元以内")]
        [Display(Name = "换卡费")]
        /// <summary>
        /// 工本费(换卡费)
        /// </summary>
        public decimal OptdePosit
        {
            get;
            set;
        }
        public int GroupIdDept
        {
            get;
            set;
        }
    }
}